package top.yamhk.agent.entity.dto;

import top.yamhk.agent.entity.KernelNode;

import java.io.Serializable;

/**
 * ThreadLocal
 *
 * @author 庆 HongKong
 * @date 2020/12/19 20:27
 */
public class MatrixNode implements Serializable {
    /**
     * 当前节点-异步
     */
    public static final ThreadLocal<String> username = ThreadLocal.withInitial(String::new);
    /**
     * 当前节点-异步
     */
    public static final ThreadLocal<String> nodeKey = ThreadLocal.withInitial(String::new);
    /**
     * 当前节点-异步
     */
    public static final ThreadLocal<KernelNode> asyncNode = ThreadLocal.withInitial(KernelNode::defaultJoin);
}